Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 2 - Control Manager Reference / Control Manager Functions
Handling Keyboard Focus /


AdvanceKeyboardFocus

NEW WITH THE APPEARANCE MANAGER

Advances the keyboard focus to the next focusable control in the window.

pascal OSErr AdvanceKeyboardFocus (WindowPtr inWindow);
inWindow
On input, a pointer to the window for which you wish to advance keyboard focus.
function result
A result code; see "Result Codes". The result code errNoRootControl indicates that keyboard focus is unavailable because the window does not have an embedding hierarchy established.
DISCUSSION
The AdvanceKeyboardFocus function skips over deactivated and hidden controls until it finds the next focusable control in the window. If it does not find a focusable item, it simply returns.

When AdvanceKeyboardFocus is called, the Control Manager calls your control definition function and passes kControlMsgFocus in its message parameter and kControlFocusNextPart in its param parameter. In response to this message, your control definition function should change keyboard focus to its next part, the entire control, or remove keyboard focus from the control, depending upon the circumstances. See "Handling Keyboard Focus" for a discussion of possible responses to this message.

SEE ALSO
ReverseKeyboardFocus.

"Handling Keyboard Focus".

"Appearance Manager Gestalt Selector Constants".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998